package com.zhan.signalling.entity;

import java.io.Serializable;

import com.zhan.signalling.annotation.IgnoreField;
import com.zhan.signalling.annotation.IndexColumn;
import com.zhan.signalling.annotation.PrimaryKey;
import com.zhan.signalling.annotation.TableStore;

@TableStore(name="chat_record")
public class ChatRecord implements Serializable{
	
	
	/**
	 * 
	 */
	@IgnoreField
	private static final long serialVersionUID = 4659263202936260535L;

	/**
	 * 用户唯一标识
	 */
	@PrimaryKey(name="uuId",order=1)
	private String uuId;
	
	private String role;
	
	private String content;
	
	/**
	 * groupId
	 */
	@PrimaryKey(name="groupId",isPartition=true, order=1)
	private String groupId;
	
	@PrimaryKey(name="platform_groupId",isPartition=true, order=0)
	private String platform_groupId;
	
	@PrimaryKey(name="sendTime",order=2)
	private Long sendTime;
	
	private Long createTime;
	
	private String eventType;
	
	/**
	 * 索引表
	 * {@link IndexColumn}
	 */
	@IndexColumn(indexName="platform_index",name="platform",primaryKey= {"groupId"})
	private String platform;
	
	private String extras;

	public String getUuId() {
		return uuId;
	}

	public void setUuId(String uuId) {
		this.uuId = uuId;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	public String getPlatform() {
		return platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public String getExtras() {
		return extras;
	}

	public void setExtras(String extras) {
		this.extras = extras;
	}

	public Long getSendTime() {
		return sendTime;
	}

	public void setSendTime(Long sendTime) {
		this.sendTime = sendTime;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public String getPlatform_groupId() {
		return platform+":"+groupId;
	}

	public void setPlatform_groupId(String platform_groupId) {
		this.platform_groupId = platform_groupId;
	}
 	
	
	
}
